#ifndef ENGINE_H
#define ENGINE_H


#include "Framework/Prerequisites.h"

namespace tyro
{

	namespace Engine
	{

		

		class Engine
		{
		public:
			Engine( HINSTANCE windownInstance, HWND windowHandle = 0 );
			static	void	Create( HINSTANCE winInstance, HWND window = NULL );
			Graphics::IRenderWindow* Initialise();
			bool			Update(FLOAT_32 timestep);

			Scene::ISceneManager* CreateSceneManager();
			Graphics::IRenderEngine* GetRenderEngine();
			Graphics::MaterialManager* GetMaterialManager();

			bool			Resume();
			bool			Suspend();
			bool			Stop();


			FLOAT_32		GetTimeStep();




		private:
			bool							LoadConfig();
			

			HWND				windowHandle;
			HINSTANCE			windowInstance;

			Framework::Timer*				timer;
			Framework::LogFile*				runLog;
			IO::IFileSystem*				fileSystem;
			Scene::ISceneManager*			sceneManager;
			Graphics::IRenderEngine*		renderEngine;
			Graphics::IRenderWindow*		renderWindow;
			Graphics::MaterialManager*		materialManager;

			FLOAT_32						timestep;

		};

	}
}


#endif